<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.text.locale.Collation</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.text.locale.Collation";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.text.locale.Collation.html" class="symbol">tango.text.locale.Collation</a></h1>
  
<p class="sec_header">License:</p>BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a>
<p class="sec_header">Version:</p>Initial release: 2005
<p class="sec_header">Author:</p>John Chapman
<dl>
<dt class="decl">class <a class="symbol _class" name="StringComparer" href="./htmlsrc/tango.text.locale.Collation.html#L25" kind="class" beg="25" end="108">StringComparer</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#StringComparer" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L25">#</a></dt>
<dd class="ddef">
<div class="summary">Compares strings using the specified case and cultural comparision rules.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="StringComparer.this" href="./htmlsrc/tango.text.locale.Collation.html#L43" kind="ctor" beg="43" end="46">this</a><span class="params">(Culture <em>culture</em>, bool <em>ignoreCase</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#StringComparer.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L43">#</a></dt>
<dd class="ddef">
<div class="summary">Creates an instance that compares strings using the rules of the specified culture.</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>culture</em></td><td>A Culture instance whose rules are used to compare strings.</td></tr>
<tr><td><em>ignoreCase</em></td><td>true to perform case-insensitive comparisons; false to perform case-sensitive comparisions.</td></tr></table></dd>
<dt class="decl">int <a class="symbol _function" name="StringComparer.compare" href="./htmlsrc/tango.text.locale.Collation.html#L56" kind="function" beg="56" end="58">compare</a><span class="params">(char[] <em>strA</em>, char[] <em>strB</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#StringComparer.compare" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L56">#</a></dt>
<dd class="ddef">
<div class="summary">Compares two strings and returns the sort order.</div>
<p class="sec_header">Returns:</p>-1 is strA is less than strB; 0 if strA is equal to strB; 1 if strA is greater than strB.
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>strA</em></td><td>A string to compare to strB.</td></tr>
<tr><td><em>strB</em></td><td>A string to compare to strA.</td></tr></table></dd>
<dt class="decl">bool <a class="symbol _function" name="StringComparer.equals" href="./htmlsrc/tango.text.locale.Collation.html#L68" kind="function" beg="68" end="70">equals</a><span class="params">(char[] <em>strA</em>, char[] <em>strB</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#StringComparer.equals" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L68">#</a></dt>
<dd class="ddef">
<div class="summary">Indicates whether the two strings are equal.</div>
<p class="sec_header">Returns:</p>true if strA and strB are equal; otherwise, false.
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>strA</em></td><td>A string to compare to strB.</td></tr>
<tr><td><em>strB</em></td><td>A string to compare to strA.</td></tr></table></dd>
<dt class="decl">StringComparer <a class="symbol _function" name="StringComparer.currentCulture" href="./htmlsrc/tango.text.locale.Collation.html#L77" kind="function" beg="77" end="79">currentCulture</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#StringComparer.currentCulture" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L77">#</a></dt>
<dd class="ddef">
<div class="summary"><i>Property.</i> Retrieves an instance that performs case-sensitive comparisons using the rules of the current culture.</div>
<p class="sec_header">Returns:</p>A new StringComparer instance.</dd>
<dt class="decl">StringComparer <a class="symbol _function" name="StringComparer.currentCultureIgnoreCase" href="./htmlsrc/tango.text.locale.Collation.html#L86" kind="function" beg="86" end="88">currentCultureIgnoreCase</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#StringComparer.currentCultureIgnoreCase" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L86">#</a></dt>
<dd class="ddef">
<div class="summary"><i>Property.</i> Retrieves an instance that performs case-insensitive comparisons using the rules of the current culture.</div>
<p class="sec_header">Returns:</p>A new StringComparer instance.</dd>
<dt class="decl">StringComparer <a class="symbol _function" name="StringComparer.invariantCulture" href="./htmlsrc/tango.text.locale.Collation.html#L95" kind="function" beg="95" end="97">invariantCulture</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#StringComparer.invariantCulture" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L95">#</a></dt>
<dd class="ddef">
<div class="summary"><i>Property.</i> Retrieves an instance that performs case-sensitive comparisons using the rules of the invariant culture.</div>
<p class="sec_header">Returns:</p>A new StringComparer instance.</dd>
<dt class="decl">StringComparer <a class="symbol _function" name="StringComparer.invariantCultureIgnoreCase" href="./htmlsrc/tango.text.locale.Collation.html#L104" kind="function" beg="104" end="106">invariantCultureIgnoreCase</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#StringComparer.invariantCultureIgnoreCase" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L104">#</a></dt>
<dd class="ddef">
<div class="summary"><i>Property.</i> Retrieves an instance that performs case-insensitive comparisons using the rules of the invariant culture.</div>
<p class="sec_header">Returns:</p>A new StringComparer instance.</dd></dl></dd>
<dt class="decl">alias int delegate(char[], char[]) <a class="symbol _alias" name="StringComparison" href="./htmlsrc/tango.text.locale.Collation.html#L115" kind="alias" beg="115" end="115">StringComparison</a>; <a title="Permalink to this symbol" href="#StringComparison" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L115">#</a></dt>
<dd class="ddef">
<div class="summary"><i>Delegate.</i> Represents the method that will handle the string comparison.</div>
<p class="sec_header">Remarks:</p>The delegate has the signature <i>int delegate(char[], char[])</i>.</dd>
<dt class="decl">class <a class="symbol _class" name="StringSorter" href="./htmlsrc/tango.text.locale.Collation.html#L120" kind="class" beg="120" end="243">StringSorter</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#StringSorter" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L120">#</a></dt>
<dd class="ddef">
<div class="summary">Sorts strings according to the rules of the specified culture.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="StringSorter.this" href="./htmlsrc/tango.text.locale.Collation.html#L137" kind="ctor" beg="137" end="141">this</a><span class="params">(StringComparer <em>comparer</em> = null)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#StringSorter.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L137">#</a></dt>
<dd class="ddef">
<div class="summary">Creates an instance using the specified StringComparer.</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>comparer</em></td><td>The StringComparer to use when comparing strings. <i>Optional.</i></td></tr></table></dd>
<dt class="decl"><a class="symbol _ctor" name="StringSorter.this:2" href="./htmlsrc/tango.text.locale.Collation.html#L150" kind="ctor" beg="150" end="152">this</a><span class="params">(StringComparison <em>comparison</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#StringSorter.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L150">#</a></dt>
<dd class="ddef">
<div class="summary">Creates an instance using the specified delegate.</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>comparison</em></td><td>The delegate to use when comparing strings.</td></tr></table>
<p class="sec_header">Remarks:</p>The comparison parameter must have the same signature as StringComparison.</dd>
<dt class="decl">void <a class="symbol _function" name="StringSorter.sort" href="./htmlsrc/tango.text.locale.Collation.html#L159" kind="function" beg="159" end="161">sort</a><span class="params">(inout char[][] <em>array</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#StringSorter.sort" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L159">#</a></dt>
<dd class="ddef">
<div class="summary">Sorts all the elements in an array.</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>array</em></td><td>The array of strings to _sort.</td></tr></table></dd>
<dt class="decl">void <a class="symbol _function" name="StringSorter.sort:2" href="./htmlsrc/tango.text.locale.Collation.html#L170" kind="function" beg="170" end="209">sort</a><span class="params">(inout char[][] <em>array</em>, int <em>index</em>, int <em>count</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#StringSorter.sort:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L170">#</a></dt>
<dd class="ddef">
<div class="summary">Sorts a range of the elements in an array.</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>array</em></td><td>The array of strings to _sort.</td></tr>
<tr><td><em>index</em></td><td>The starting index of the range.</td></tr>
<tr><td><em>count</em></td><td>The number of elements in the range.</td></tr></table></dd>
<dt class="decl">StringSorter <a class="symbol _function" name="StringSorter.currentCulture" href="./htmlsrc/tango.text.locale.Collation.html#L215" kind="function" beg="215" end="217">currentCulture</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#StringSorter.currentCulture" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L215">#</a></dt>
<dd class="ddef">
<div class="summary"><i>Property.</i> Retrieves an instance that performs a case-sensitive sort using the rules of the current culture.</div>
<p class="sec_header">Returns:</p>A StringSorter instance.</dd>
<dt class="decl">StringSorter <a class="symbol _function" name="StringSorter.currentCultureIgnoreCase" href="./htmlsrc/tango.text.locale.Collation.html#L223" kind="function" beg="223" end="225">currentCultureIgnoreCase</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#StringSorter.currentCultureIgnoreCase" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L223">#</a></dt>
<dd class="ddef">
<div class="summary"><i>Property.</i> Retrieves an instance that performs a case-insensitive sort using the rules of the current culture.</div>
<p class="sec_header">Returns:</p>A StringSorter instance.</dd>
<dt class="decl">StringSorter <a class="symbol _function" name="StringSorter.invariantCulture" href="./htmlsrc/tango.text.locale.Collation.html#L231" kind="function" beg="231" end="233">invariantCulture</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#StringSorter.invariantCulture" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L231">#</a></dt>
<dd class="ddef">
<div class="summary"><i>Property.</i> Retrieves an instance that performs a case-sensitive sort using the rules of the invariant culture.</div>
<p class="sec_header">Returns:</p>A StringSorter instance.</dd>
<dt class="decl">StringSorter <a class="symbol _function" name="StringSorter.invariantCultureIgnoreCase" href="./htmlsrc/tango.text.locale.Collation.html#L239" kind="function" beg="239" end="241">invariantCultureIgnoreCase</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#StringSorter.invariantCultureIgnoreCase" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.text.locale.Collation.html#L239">#</a></dt>
<dd class="ddef">
<div class="summary"><i>Property.</i> Retrieves an instance that performs a case-insensitive sort using the rules of the invariant culture.</div>
<p class="sec_header">Returns:</p>A StringSorter instance.</dd></dl></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2005 John Chapman. All rights reserved</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:42 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>